From 9131716360545c06feb0d73edba1ff4be988bbba Mon Sep 17 00:00:00 2001 From: Rob Church Date: Tue, 4 Jul 2006 04:20:14 +0000 Subject: [PATCH] * (bug 6504) Allow configuring session name with $wgSessionName --- RELEASE-NOTES | 1 + includes/DefaultSettings.php | 3 +++ includes/Setup.php | 5 ++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9375cb7016..3e8b512110 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -638,6 +638,7 @@ Some default configuration options have changed: * (bug 6530) Update to Indonesian localisation (id) #25 * (bug 6523) Fix SVG issue in rebuildImages.php * (bug 6512) Link to page-specific logs on page histories +* (bug 6504) Allow configuring session name with $wgSessionName == Compatibility == diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index d333e0fcc4..9e5028bc8c 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1106,6 +1106,9 @@ $wgCookiePath = '/'; $wgCookieSecure = ($wgProto == 'https'); $wgDisableCookieCheck = false; +/** Override to customise the session name */ +$wgSessionName = false; + /** Whether to allow inline image pointing to other websites */ $wgAllowExternalImages = false; diff --git a/includes/Setup.php b/includes/Setup.php index 469a69195f..1ef83cc7e2 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -126,9 +126,8 @@ if ( $wgDBprefix ) { # If session.auto_start is there, we can't touch session name # -if (!ini_get('session.auto_start')) { - session_name( $wgCookiePrefix . '_session' ); -} +if( !ini_get( 'session.auto_start' ) ) + session_name( $wgSessionName ? $wgSessionName : $wgCookiePrefix . '_session' ); if( !$wgCommandLineMode && ( isset( $_COOKIE[session_name()] ) || isset( $_COOKIE[$wgCookiePrefix.'Token'] ) ) ) { wfIncrStats( 'request_with_session' ); -- 2.20.1